The invention relates generally to computer application program modules, and more particularly, the invention relates to methods and systems for detecting and correcting cyclic crash problems occurring during startup of computer application programs and documents.
Despite the best efforts of software developers, software programs inevitably fail at one time or another. One type of failure is a crash. A crash occurs while a program module is running and results in the suspension of operation of the program module. Crashes are frustrating to users and, in some cases, may cause the user to lose work.
Often users attempt to open a complicated software application only to find that the application crashes during startup. Upon such an occurrence, the user typically tries to reboot the application. If the application crashes each time the user attempts to reboot, the application may have experienced a problem that will cause the application to crash each and every time the user attempts to start the application. Such a problem that causes the application to crash each time during startup is known as a cyclic crash problem.
Prior systems have been used to detect a crash causing problem followed by attempting a subsequent startup or xe2x80x9crebootxe2x80x9d in a xe2x80x9csafe mode.xe2x80x9d Typically, entering the xe2x80x9csafe modexe2x80x9d results in the application disabling all custom program modules (e.g., third party program modules added to the application program). Such a xe2x80x9csafe modexe2x80x9d also typically results in the application resetting all customized settings to default settings. Additionally, such systems typically operate only to detect application startup problems and do not detect or handle problems caused by opening a document or other file after startup of the application with which the document or file is edited.
Accordingly, there is a need in the art for a method and system for detecting crashes and failures during startup, recognizing what problem occurred when the crash or failure occurred, and suggesting a correction action to the user so that the application may be re-started successfully.
There is further a need in the art for a method and system for detecting and correcting a crashes caused by opening a document or file after startup.
The present invention addresses the foregoing problems by providing a method and system for detecting and correcting computer software problems that cause an application program to crash upon startup. Unsafe startup actions that are costly to initiate in terms of processor time and memory are handled by placing an unsafe startup action marker into the system registry prior to attempting startup. If an unsafe program module starts or boots successfully without causing the software application to crash, the unsafe startup action marker is deleted from the system registry.
If loading the unsafe program module causes the application to crash, then startup actions, including corrective actions, are written into the unsafe startup action marker and are used on subsequent startup of the crashed application program to instruct application on how to fix the problem. Other unsafe startup actions that are not costly in terms of processor time and memory are initially handled by an exception handler. If the application crashes as a result of such an unsafe startup action, then an unsafe startup action marker is written to the system registry as described above. Corrective startup actions are written to the marker for use by the application upon reboot.
More particularly stated, the present invention provides a method and system for detecting and correcting a failure in a computer application program during startup. The method comprising the steps of attempting a startup of the computer application program; preparing a startup marker for identifying the attempted startup; and identifying an unsafe action for performing as part of the step of attempting startup. An unsafe action marker is prepared for identifying the unsafe action. After the unsafe action is attempted, if the unsafe action is performed without causing a startup failure, the unsafe action marker is deleted. And, if the computer application program is started without failure the startup marker is also deleted. If the unsafe action is not performed without causing a startup failure, startup actions for correcting a failure associated with the unsafe action upon the next attempted startup of the computer application program are written into the unsafe action marker. Preferably the startup actions are performed upon attempting a second startup of the computer application program.
Writing startup actions for correcting a failure associated with the unsafe action upon the next attempted startup of the computer application program into the unsafe action marker may include writing an instruction to disable performance of the unsafe action upon the next attempted startup of the computer application program. Alternatively, writing startup actions into the unsafe action marker may include writing an instruction to disable customizing operating settings for the functionality of the computer application program and setting operating settings to default settings.
The various aspects of the present invention may be more clearly understood and appreciated from a review of the following detailed description of the disclosed embodiments and by reference to the appended drawings and claims.